/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: Pegasus  Date: 2018-11-27 Time: 00:30
 *
 * 员工服务效率
 */

import React, {Component} from 'react';
import {
  SafeAreaView,
  View,
  Image,
  Text,
  TouchableOpacity,
  ScrollView
} from 'react-native';
import {connect} from 'react-redux';
import {styles} from "../TenantService/TenantServiceScreen.Style"
import AntDesign from "react-native-vector-icons/AntDesign"
import {COLOR_GRAY_BACKGROUND, COLOR_GRAY_LINE, COLOR_THEME} from "../../../constant/PHColors"
import EmployeeServiceEfficiencyView from "../TenantService/Component/EmployeeServiceEfficiencyView"
import {SCREEN_WIDTH} from "../../../constant/PHScreen"
import DateDisplayView from "../../../component/DateDisplayView/DateDisplayView"

class EmployeeServiceEfficiencyScreen extends Component {

  static navigationOptions = {
    title: `员工服务效率`
  }

  // 构造
  constructor(props) {
    super(props);
    // 初始状态
    this.state = {};
  }

  render() {
    return (
      <SafeAreaView style={styles.container}>

        {
          <DateDisplayView
            leftText={'11月24日报表'}
            onClickLeft={() => {}}
            rightText={'全部服务排名'}
            onClickRight={() => {}}
          />
        }

        <ScrollView style={styles.scroll}>

          {/* 列表 */}
          <View>
            <EmployeeServiceEfficiencyView/>
          </View>

          <View style={styles.desView}>
            <View style={styles.desTopView}>
              <View style={styles.circleGreen}/>
              <Text style={styles.desText}>等于/优与平均</Text>
              <View style={styles.circleRed}/>
              <Text style={styles.desText}>低于平均</Text>
            </View>
            <View style={styles.desTopView}>
              {/*TODO: 平均值需要计算*/}
              <Text style={styles.desText}>(超时平均值为37%，异常平均值为25%)</Text>
            </View>
          </View>

        </ScrollView>


      </SafeAreaView>
    )
  }

  _onClickSelectDate() {

  }
}

const props = state => {
  return {}
}

export default EmployeeServiceEfficiencyScreen = connect(props)(EmployeeServiceEfficiencyScreen);
